package com.learn.rmi;

import javax.management.remote.rmi.RMIConnection;
import java.io.Serializable;
import java.lang.management.ManagementFactory;
import java.rmi.RemoteException;
import java.rmi.server.RMIClientSocketFactory;
import java.rmi.server.RMIServerSocketFactory;
import java.rmi.server.UnicastRemoteObject;
import java.util.StringJoiner;

/**
 * @author wangxing
 * @version 2020/7/4 13:24 Administrator
 */
public class UserServiceImpl extends UnicastRemoteObject implements IUserService, Serializable {

    protected UserServiceImpl() throws RemoteException {
    }

    @Override
    public String getName(int id) {
        return String.format("王星 :%s", ManagementFactory.getRuntimeMXBean().getName());
    }
}
